<?php /* Create Student Controller */
	require_once('modules/students/actions/create/scripts/validate-student.php');
	if (isset($_POST['form-action'])) {
		$validacion = validarAlumno();
		if (!empty($validacion)) { //fallo validacion
			require_once('modules/students/actions/create/view/create-student.php');
		} else { //si valido correcto
			$last_id = $student->insert('alumnos');
			$student->addStudentToTeacher($last_id,1);
			//$student->sendEmail();
			require_once('modules/students/actions/list/index.php');
		}
	} else {
		$student->set('alumnos','pais','Argentina');
		$student->set('alumnos','idioma','es');
		$student->set('alumnos','huso_horario',-3);
		require_once('modules/students/actions/create/view/create-student.php');
	}
?>